package com.kx.project.exam.domain;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.kx.platform.aspectj.lang.annotation.Excel;
import com.kx.platform.aspectj.lang.annotation.Excel.ColumnType;
import com.kx.platform.web.domain.BaseEntity;

/**
 * 题目表
 * 
 * @author kx  
 */
public class Question extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @Excel(name = "主键", cellType = ColumnType.NUMERIC)
    private Long id;

    /** 名称 */
    @Excel(name = "名称")
    private String questionName;

    /** 类型 */
    @Excel(name = "类型")
    private String questionType;

    /** （Y是 N否） */
    @Excel(name = "重点题目", readConverterExp = "Y=是,N=否")
    private String isKeypoint;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @NotBlank(message = "题目名称不能为空")
    @Size(min = 0, max = 100, message = "题目名称不能超过100个字符")
    public String getQuestionName() {
        return questionName;
    }

    public void setQuestionName(String questionName) {
        this.questionName = questionName;
    }

    public String getIsKeypoint() {
        return isKeypoint;
    }

    public void setIsKeypoint(String isKeypoint) {
        this.isKeypoint = isKeypoint;
    }

    public String getQuestionType() {
        return questionType;
    }

    public void setQuestionType(String questionType) {
        this.questionType = questionType;
    }
    
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("questionName", getQuestionName())
            .append("questionType", getQuestionType())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
